//
//  Common.swift
//  Weibo
//
//  Created by 张鹏 on 16/6/25.
//  Copyright © 2016年 张鹏. All rights reserved.
//
//相当于OC中的pch文件
import UIKit

//切换根控制器标识
let SwitchRootVcNoti = "SwitchRootVcNoti"

//微博相关信息参数
let APPKEY = "1738278099"
let APPSECRET  = "a70dc4cfa61fff0abc2513bc51274df0"
let REDIRECT_URI = "http://www.baidu.com"

///屏幕的宽高
let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height
///主题颜色
let ThemeColor = UIColor.orangeColor()
///RGB
func RBG(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor{
    return UIColor(red: red / 255, green: green / 255, blue: blue / 255, alpha: 1)
}
///随机颜色
func RandomColor() -> UIColor{
    let r = CGFloat(random()%256)
    let g = CGFloat(random()%256)
    let b = CGFloat(random()%256)
    return RBG(r, green: g, blue: b)
}
